package org.csmz.class2333;

public class Example04 {
    public static void main(String[] args){
        String username1 = "cxk2.5!";
        String username2 = "Cxk2.5!";
        System.out.println("字符串"+username1+"是否以cxk开头："+username1.startsWith("cxk"));
        System.out.println("字符串"+username1+"是否以！结尾："+username1.endsWith("!"));
        System.out.println("字符串"+username1+"是否为空："+username1.isEmpty());
        System.out.println("字符串"+username1+"是否包含字符串2.5："+username1.contains("2.5"));
        System.out.println("字符串"+username1+",username2"+ "内容是否相同："+username1.equals(username2));
        System.out.println("忽略大小判断字符串"+username1+",username2"+"内容是否相同：" +username1.equalsIgnoreCase(username2));
    }
}
